<aside class="lg-side">
  <div class="panel-heading tab-bg-dark-navy-blue okr-tab-head tab-right "></div>
  <div class="inbox-body mi-h8">
    <div class="row">
      <div class="col-lg-12">
        <section class="panel">
          <header class="panel-heading">
            联系人管理
          </header>
          <div class="panel-body">
            <div id="telContainer" class="dlshouwen-grid-container"></div>
            <div id="telToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
          </div>
        </section>
      </div>
    </div>
  </div>
</aside>
<script>
  var cid = 0;
  function findLxrList($certusUtils, id) {
    cid = id;
    var telColumns = [{
      id: 'cusName',
      title: '联系人名称',
      type: 'string',
      width: 100,
      columnClass: 'text-center'
    },
    {
      id: 'telePhone',
      title: '联系方式',
      type: 'string',
      width: 110,
      columnClass: 'text-center'
    },
    {
      id: 'email',
      title: '邮件地址',
      type: 'string',
      width: 200,
      columnClass: 'text-center'
    },
    {
      id: 'cusDesc',
      title: '注释',
      type: 'string',
      columnClass: 'text-left'
    },
    {
      id: 'operation',
      title: '操作',
      type: 'string',
      width: 150,
      columnClass: 'text-center',
      resolution: function (value, record, column, grid, dataNo, columnNo) {
        var content = '';
        content += '<button class="btn btn-xs btn-info" onclick="updateCus(' + record.id + ');"><i class="fa fa-edit"></i>  编辑</button>';
        content += '  ';
        content += '<button class="btn btn-xs btn-danger" onclick="delCus(' + record.id + ');"><i class="fa fa-trash-o"></i>  删除</button>';
        return content;
      }
    }
    ];
    $certusUtils.ajax('findCusList', { "comid": id }, function (result) {
      var telOption = {
        lang: 'zh-cn',
        ajaxLoad: false,
        // loadURL:'url',
        exportFileName: '联系人管理',
        datas: result.data,
        columns: telColumns,
        gridContainer: 'telContainer',
        toolbarContainer: 'telToolBarContainer',
        tools: '',
        pageSize: 10,
        pageSizeLimit: [10, 15, 20]
      };
      var telGrid = $.fn.dlshouwen.grid.init(telOption);
      telGrid.load();
    })
  }

  function delCus(id) {
    layer.confirm('确认删除此数据？', {
      btn: ['确认', '取消'] //按钮
    }, function () {
      $certusUtils.ajax('delLxr', { "id": id }, function (result) {
        layer.msg("删除成功");
        toLoadHtml(6, cid);
      });
    });
  }

  function updateCus(id) {
    toLoadHtml(9, id);
  }
</script>